
<!-- 低代码 主页面：用于展示列表页 -->

<template>
	<view class="lowcode-nav-wrap">
		<eui-nav-bar :title="lowcodePage?.c_name || ''" color="#333"  />
		<eui-search-bar v-if="lowcodePage?.Search?.SearchItems?.length" ref="searcBarRef" radius="100" showFilter placeholder="请输入搜索内容" @clear="handleClearSearch" @confirm="handleEnterSearch" >
			<template #searchFields>
				<view class="lowcode-components-wrap">
					<view v-for="(colField, idx) in lowcodePage?.Search?.SearchItems" :key="idx" class="lowcode-components-item">
						<DynamicComponent :conf-object="colField" :data-object="state.searchCardData" parentSrc="1" @handleDynamicChange="handleSearchDynamicChange" :md-code="state.mdCode || ''" />
					</view>
				</view>
				<view class="lowcode-popup-bottom flex-1 flex">
					<eui-button type="max2" title="重置" singleTag="重置" @buttonClick="handlePopupClose"></eui-button>
					<eui-button type="max" title="确认" singleTag="确认" @buttonClick="handlePopupClose"></eui-button>
				</view>
			</template>
		</eui-search-bar>
	</view>

	<scroll-view scroll-y :refresher-enabled='true' :refresher-triggered="scrollTriggerd" @refresherrefresh="handleScrollRefresh"
		@scrolltolower="handleScrolltolower" :style="getScrollViewStyle()" >
		<view v-for="(rowData, idx) in state.mdListData" :key="idx" class="list-view">
			<eui-card :title="getCardTitle(rowData)" hPadding="28" type="single" @click.self="handleCardClick(rowData)" >
				<template v-slot:extra><view class="extra-view"><eui-status type="primary" :title="EBillStatusTxt[rowData?.c_status]" /></view></template>
				<view class="lowcode-page-card-cnt">
					<eui-row v-for="(rowCols, fIdx) in state?.listColumns" :key="fIdx" class="lowcode-page-row-wrap">
						<eui-col v-for="(colField, cfIdx) in rowCols" :key="cfIdx" class="lowcode-page-col" :span="colField?.c_col_span || 12">
							<eui-text cWidth="width: 100%" v-bind="state.cellProps?.[idx+'_'+fIdx+'_'+cfIdx]" />
						</eui-col>
					</eui-row>
				</view>
				<view class="lowcode-card-btm-btns-wrap" >
					<eui-fab v-if="state.menusCFGMore?.length" class="lowcode-card-btm-btn-more"
                   :fabIndex="idx" :activeIndex="activeIndex" @fabClick="fabClick"
                   direction="vertical" :content="state.menusCFGMore" @trigger="handleMoreBtnClick" >
						<eui-uicons color="#888888" type="more-filled" size="30" />
					</eui-fab>
					<eui-button
						v-for="(mCFG, mIdx) in state.menusCFG"
						:key="mIdx"
						:type="getMenuBtnType(mCFG, mIdx)"
						:title="mCFG.menuTitle"
						:disabled="mBtnDis(mCFG, rowData)"
						@buttonClick="handleBtnClick(mCFG, rowData)"
						class="lowcode-card-btm-btn"
					/>
				</view>
			</eui-card>
		</view>
	</scroll-view>

	<eui-popup ref="popupAuditRef" class="lowcode-create-popup-wrap" background-color="#f8f8f8" type="bottom" :mask-click="false">
		<view class="lowcode-popup-content" >
			<view class="lowcode-popup-title"><view class="lowcode-popup-title-txt" >输入工作密码</view></view>
			<view class="lowcode-popup-default-content">
				<eui-card-input :value="'[' + store?.state?.value?.main?.loginInfo?.sUser + ']' + store?.state?.value?.main?.loginInfo?.sUserName" title="审核用户" type="textname" />
				<eui-card-input v-model="workPwd" title="工作密码" type="password" />
			</view>
		</view>
		<view class="lowcode-popup-bottom flex-1 flex">
			<eui-button type="max2" title="取消" singleTag="取消" @buttonClick="handleAuditClose"></eui-button>
			<eui-button type="max" title="确认" singleTag="确认" @buttonClick="handleAuditClose"></eui-button>
		</view>
	</eui-popup>
</template>

<script setup lang="ts" >
import { ref, watch } from "vue";
import { onLoad, onReady, onShow } from "@dcloudio/uni-app";
import store from '@/store';
import useService from "@/hooks/useService";
import serviceTools from '@/common/service';
import { initRdsDict, getRdsSysConfig } from '@/hooks/init';

import DynamicComponent from "../dynamicComponent/index.vue";
import useComponentProps from "../hooks/useComponentProps";
import useLowcodeSystemInfo from "../hooks/useSystemInfo";
import { formGridSort, lowcodeDefStatus } from "../utils";
import type { LowcodeMdInfo, LowcodeMenuItemCFG, LowcodePage, LowCodePagination, LowcodeRect, LowCodeWhereListItem } from "../interface";
import { LOWCODERUNTIMEUNIQUEKEY, EBillStatusTxt, EBillApproveStatus, LOWCODEUNIQUEKEY, EBillStatus, ECBillStatus, ECBillApproveStatus } from "../constant";
import type { FetchMdBillListDataProxy, MdBillListState, FetchMdBillListReq, FetchMdBillListRes } from "./interface";
import useLowcodeMenuBtns from "../hooks/useLowcodeMenuBtns";

const props = defineProps<{ lowcodePage: LowcodePage; detailMdCode: string; mdInfo: LowcodeMdInfo }>();

const scrollTriggerd = ref<boolean>(false);
const searcBarRef = ref(null);
const activeIndex = ref(null);
const workPwd = ref(""), workPwdBillId = ref(), popupAuditRef = ref();
const state = ref<MdBillListState>({ mdListData: [], listColumns: [], /* listColumnsConf: {}, */ menusCFG: [], searchCardData: {} });
const pagination = ref<LowCodePagination>({ CurrentPage: 1, RowsCount: 0, PageCount: 1, fetchCount: 0 });
const service = useService({ prefix: "mainApi" }), serviceMBM = useService({ prefix: "mbmApi" });
const { getSystemInfo } = useLowcodeSystemInfo();
const { getComponentProps } = useComponentProps();
const { handleDeleteBill: handleDeleteBillHook, handleCancelBill: handleCancelBillHook, handleAuditBill: handleAuditBillHook, handleAuditValidate: handleAuditValidateHook } = useLowcodeMenuBtns();

const getScrollViewStyle = () => {
	const sysH = Math.ceil(state.value?.systemInfo?.windowHeight || 0);
	const navWrapH = Math.ceil(state.value?.navWrapRect?.height || 0);
	const scrollH = (sysH >= navWrapH) ? (sysH - navWrapH) : 0;
	return { "background-color": "#f2f2f2", width: state.value?.systemInfo?.windowWidth + 'px', height: scrollH + 'px' };
};

const getMenuBtnType = (mCFG: LowcodeMenuItemCFG, mIdx: number) => {
	if (mIdx + 1 === state.value?.menusCFG?.length) {
		return "min";
	}
	return "min2";
};

const mBtnDis = (mCFG: LowcodeMenuItemCFG, rowData: { [key: string]: any }) => {
	let btnDis = false; // TODO 新建和审批，权限码里不包含这两个，要不要根据权限码判断禁用
	const mdLimit = props?.mdInfo?.c_limitcode || "R";  	// c_limitcode: "RWSAOICUXDBP"
	const enableApprove = state.value.enableApprove;
	const c_status = rowData?.c_status || EBillStatus.尚未审核;
	const appStatus = rowData?.c_approve_status || EBillApproveStatus.尚未审批;
	if (mCFG.menuCode === "APPROVE") { // 审批
		const isNotApproved = c_status === EBillStatus.尚未审核 || c_status === ECBillStatus.NotApproved; // 尚未审核
    const isNotYetApproved = appStatus === EBillApproveStatus.NotYetApproved || appStatus === ECBillApproveStatus.NotYetApproved; // 尚未审批
    const isApprovalPassed = (appStatus === EBillApproveStatus.ApprovalPassed || appStatus === ECBillApproveStatus.ApprovalPassed); // 审批已通过
		btnDis = !(enableApprove ? (isNotApproved || isApprovalPassed) : (isNotYetApproved ? false : true));
		// btnDis = !state.value.enableApprove;
		// if ([EBillApproveStatus.正在审批, EBillApproveStatus.ApprovalProgress].includes(appStatus)) {
		// 	btnDis = true;
		// }
		// if (!mdLimit.includes("E")) {
		// 	btnDis = true;
		// }
	}
	if (mCFG.menuCode === "DeleteBill" && !mdLimit.includes("D")) {
		btnDis = true; 	// 删单
	}
	if (mCFG.menuCode === "Cancel" && !mdLimit.includes("C")) {
		btnDis = true;	 // 作废
	}
	if (mCFG.menuCode === "AUDIT") {
		const isNotApproved = c_status === EBillStatus.尚未审核 || c_status === ECBillStatus.NotApproved; // 尚未审核
		const isApprovalPassed = (appStatus === EBillApproveStatus.ApprovalPassed || appStatus === ECBillApproveStatus.ApprovalPassed); // 审批已通过
		const isApprovving = (appStatus === EBillApproveStatus.ApprovalProgress || appStatus === ECBillApproveStatus.ApprovalProgress); // 正在审批
		btnDis = !(isNotApproved && (enableApprove ? isApprovalPassed : true)) || isApprovving;
		if (!mdLimit.includes("A")) {
			btnDis = true; 	 // 审核
		}
		// btnDis = false; 	 // 审核
	}
	// if (mCFG.menuCode === "NEWBILL" && !mdLimit.includes("D")) {
	// 	btnDis = true;	 // 新单
	// }
	return btnDis;
};

const getCardTitle = (rowData: any) => {
	const cIdConf = props?.lowcodePage?.Panels?.[0]?.Components?.find(c => c.c_code === "c_id");
	const rawIdVal = rowData?.c_id || "";
	if (cIdConf?.c_displayname_code) {
		const rawIdNameVal = rowData?.[cIdConf?.c_displayname_code] || "";
		return rawIdVal ? `[${rawIdVal}]${rawIdNameVal || ""}` : rawIdVal;
	}
	return rawIdVal;
};

const deleteCancel = async (mCFG: LowcodeMenuItemCFG, rowData: { [key: string]: any }) => {
	uni.showLoading({ title: "处理中...", mask: true});
	const fetchProxy = { BillId: rowData?.c_id, UserNo: store?.state?.value?.main?.loginInfo?.sUser, ModuleCode: state.value?.mdCode };
	const fetcRes = mCFG.menuCode === "DeleteBill" ? await handleDeleteBillHook(fetchProxy) : await handleCancelBillHook(fetchProxy);
	if (fetcRes) {
		pagination.value = { CurrentPage: 1, RowsCount: 0, PageCount: 1, fetchCount: 0 };
		fetchMdListData();
	}
};

const	handleAuditClose = async ({ singleTag }) => {
	if (singleTag === "取消") {
		return popupAuditRef.value?.close();
	}
	const userNo = store?.state?.value?.main?.loginInfo?.sUser;
	const userName = store?.state?.value?.main?.loginInfo?.sUserName;
	if (!workPwd.value) {
		return serviceTools.enjoyShowToast(`请录入[${userNo}]${userName}的审核密码！`);
	}

	const p = { InputAuditUserNo: userNo, MdCode: state.value?.mdCode || "", WkPassword: workPwd.value };
	const validateAuditRes = await handleAuditValidateHook(p);
	if (validateAuditRes) {
		return serviceTools.enjoyShowToast(validateAuditRes);
	}
	const fetcRes = await handleAuditBillHook({ ...workPwdBillId.value });
	if (fetcRes) {
		fetchMdListData();
		popupAuditRef.value?.close();
	}
};

const navigateToDetail = async (billId?: string) => {
	const fetchReqProxy = { ModuleCode: state.value.mdCode };
	const fetchReq = { LowcodeGuid: state.value.mdCode || "", LowcodeDetailGuid: state.value.detailMdCode || "" };
	const fetchRes = await service.request(LOWCODEUNIQUEKEY, "FindMobileRuntimeDetailPage", fetchReq, "", "", fetchReqProxy);
	const templateType = fetchRes?.LowcodePage?.c_template;
	if (!templateType) {
		return;
	}
	let detailPageStr = `?LowcodeGuid=${state.value.mdCode}&LowcodeDetailGuid=${state.value.detailMdCode}&mdInfo=${JSON.stringify(props?.mdInfo)}`;
	const editPath = billId ? "index" : "edit";
	if (templateType === "9") {
		detailPageStr = `/pages/MainViews/lowcode/billDetail/${editPath}${detailPageStr}`;
	} else if (templateType === "10") {
		detailPageStr = `/pages/MainViews/lowcode/richDetail/${editPath}${detailPageStr}`;
	}

	if (billId) {
		detailPageStr = detailPageStr + `&billId=${billId}`;
	}
	detailPageStr?.startsWith("/pages/MainViews/lowcode") && uni.navigateTo({ url: detailPageStr });
};

const handleBtnClick = async (mCFG: LowcodeMenuItemCFG, rowData: { [key: string]: any }) => {
	const BillId = rowData?.c_id;
	if (["DeleteBill", "Cancel"].includes(mCFG?.menuCode || "")) {
		const modalCnt = `您确认要${mCFG.menuTitle}当前单据吗？`;
		uni.showModal({ title: "提示", content: modalCnt, success: (res) => res.confirm && deleteCancel(mCFG, rowData) });
		return;
	}
	if (mCFG.menuCode === "AUDIT") {
		if (!BillId) {
      serviceTools.enjoyShowToast("请先保存单据，再审核！");
      return false;
    }

		let asyncConfirmRes = false;
		const userNo = store?.state?.value?.main?.loginInfo?.sUser;
    const useWorkPass: string = await getRdsSysConfig("系统参数", "是否使用工作密码");

    if (useWorkPass === "确认提示") {
      const content = "请确认是否要审核当前单据？";
      asyncConfirmRes = await new Promise<boolean>((resolve, _) => uni.showModal({ title: "提示", content: content, success: (res) => res.confirm ? resolve(true) : resolve(false) }));
			if (!asyncConfirmRes) {
				return;
			}
			const fetcRes = await handleAuditBillHook({ BillId: rowData?.c_id, UserNo: userNo, ModuleCode: state.value?.mdCode });
			fetcRes && fetchMdListData();
    }

		if(useWorkPass === "是") {
			workPwdBillId.value = { BillId: rowData?.c_id, UserNo: userNo, ModuleCode: state.value?.mdCode };
			popupAuditRef.value?.open();
    }
	}
	if (mCFG.menuCode === "APPROVE") {
		const appStatus = rowData?.c_approve_status || EBillApproveStatus.尚未审批;
		if ([EBillApproveStatus.正在审批, EBillApproveStatus.ApprovalProgress].includes(appStatus)) {
			uni.showLoading({ title: "查询中...", mask: true});
			const fetchReqTag = { Search: BillId, Type: props.mdInfo?.c_md_cname, StartDt: "", EndDt: "", SendUser: "", UserNo: store?.state?.value?.main?.loginInfo?.sUser };
			const fetchReq = { CurrentPage: 1, IsNotPage: false, PageCount: 1, PageSize: 10, RowsCount: 0, Tag: fetchReqTag };
			const fetchRes = await serviceMBM.request("管易通40审批", "GetApprovedListByBillType", fetchReq);
			const billAppInfo = fetchRes?.ReturnObject?.[0];
			if (billAppInfo) {
				uni.navigateTo({ url: '/pages/OaViews/Approve/ApproveStatus?item=' + JSON.stringify(billAppInfo) + '&tabIndex=2' });
			}
			if (!fetchRes || !billAppInfo) {
				uni.showModal({ title: "提示", content: "未查询到单据的审批信息！", success: res => {} });
			}
			return uni.hideLoading();
		}
		uni.navigateTo({ url: `/pages/ComDlgSelections/dlgSelApproveFlowSend?billId=${rowData?.c_id}&billKey=${rowData?.c_id}&mdCode=${state.value?.mdCode}&mdCName=${props?.mdInfo?.c_md_cname}&billStatus=${rowData?.c_status}&appStatus=${rowData?.c_approve_status}&uniqueKey=${LOWCODERUNTIMEUNIQUEKEY}` }); // uniqueKey mainlowcodepcruntime
	}
	if (mCFG?.menuCode === "NEWBILL") {
		navigateToDetail();
		// uni.navigateTo({ url: `../lowcode/billDetail/edit?LowcodeGuid=${state.value.mdCode}&LowcodeDetailGuid=${state.value.detailMdCode}&mdInfo=${JSON.stringify(props?.mdInfo)}` });
	}
};

const handleCardClick = (rowData: any) => {
	navigateToDetail(rowData.c_id);
	// console.log("handleCardClick ", rowData); // LowcodeGuid    LowcodePageGuid
	// uni.navigateTo({ url: `../lowcode/billDetail/index?billId=${rowData.c_id}&LowcodeGuid=${state.value.mdCode}&LowcodeDetailGuid=${state.value.detailMdCode}&mdInfo=${JSON.stringify(props?.mdInfo)}` });
};

const handleMoreBtnClick = (...rest) => {
	console.log("handleMoreBtnClick ", rest);
}

const fabClick = (e: any) => {
  activeIndex.value = e;
}

const generateWhere = () => {
	let newWhereList: LowCodeWhereListItem[] = [];
	const searchVal = state.value.fuzzyVal, fuzzyquery = props?.lowcodePage?.Search?.c_fuzzyquery;
	const fuzzyFields = fuzzyquery?.split(",");
	Array.isArray(fuzzyFields) && fuzzyquery && searchVal && fuzzyFields?.forEach((fk, idx) => {
		newWhereList.push({ c_left: idx === 0 ? "(" : "", c_col: fk, c_oper: "相似", c_value: searchVal, c_col_dtype: "System.String", c_logic: "或者", c_right: (idx + 1) === fuzzyFields.length ? ")" : "" });
	});

	Array.isArray(props?.lowcodePage?.Search?.SearchItems) && props?.lowcodePage?.Search?.SearchItems?.forEach(item => {
		const iVal = state.value.searchCardData?.[item.c_code || ""] || "";
		iVal && newWhereList.push({ c_left: "", c_col: item.c_code, c_oper: "相似", c_value: iVal, c_col_dtype: "System.String", c_logic: "而且", c_right: "" });
	});
	state.value.whereList = newWhereList;
	pagination.value = { CurrentPage: 1, RowsCount: 0, PageCount: 1, fetchCount: 0 };
	uni.showLoading({ title: "查询中...", mask: true});
};

const handleEnterSearch = (proxy?: { value?: string }) => {
	// console.log("handleEnterSearch ", proxy?.value);
	const searchVal = proxy?.value || "";
	state.value.fuzzyVal = searchVal;
	generateWhere();
	fetchMdListData();
};

const handleClearSearch = () => {
	state.value.fuzzyVal = "";
	generateWhere();
	fetchMdListData();
};

const handleSearchDynamicChange = async (key: string, newVal: any, oldVal: any, proxy?: { [key: string]: any }) => {
	// console.log("handleMainDynamicChange proxy ", key, newVal, oldVal, proxy);
	if (!state.value.searchCardData) {
		state.value.searchCardData = {};
	}

	state.value.searchCardData[key] = newVal;
};

const handlePopupClose = ({ singleTag }) => {
	if (singleTag === "重置") {
		if (!state.value.searchCardData) {
			state.value.searchCardData = {};
		}
		Array.isArray(props?.lowcodePage?.Search?.SearchItems) && props?.lowcodePage?.Search?.SearchItems?.forEach(item => state.value.searchCardData[item.c_code || ""] = "");
	}
	if (singleTag === "确认") {
		generateWhere();
		fetchMdListData();
		searcBarRef.value?.closeDrawer?.();
	}
};

const handleScrollRefresh = () => {
	if (!scrollTriggerd) {
		return;
	}
	scrollTriggerd.value = true;
	pagination.value = { CurrentPage: 1, RowsCount: 0, PageCount: 1, fetchCount: 0 };
	fetchMdListData();
};

const handleScrolltolower = () => {
	if ((pagination?.value?.CurrentPage || 0) >= (pagination?.value?.PageCount || 0)) {
		return
	}
	pagination.value.CurrentPage = (pagination?.value?.CurrentPage || 1) + 1;
	fetchMdListData();
};

const getCellProps = async () => {
	if (!state.value?.mdListData?.length || !state.value?.listColumns?.length) {
		return;
	}
	for (let idx = 0; idx < state.value?.mdListData?.length; idx++) {
		const rowData = state.value?.mdListData[idx];
		for (let fIdx = 0; fIdx < state.value?.listColumns?.length; fIdx++) {
			const rowCols = state.value?.listColumns[fIdx];
			for (let cfIdx = 0; cfIdx < rowCols?.length; cfIdx++) {
				if (!state.value?.cellProps) {
					state.value.cellProps = {};
				}
				const colField = rowCols[cfIdx];
				state.value.cellProps[idx+'_'+fIdx+'_'+cfIdx] = await getComponentProps({ componentType: 'EuiText', confObject: colField, dataObject: rowData });
			}
		}
	}
};

const fetchMdListData = async (fetchProxy?: FetchMdBillListDataProxy) => {
	uni.showLoading({ title: "查询中...", mask: true});
	const basicReq = { BillMode: 0, PageSize: 10, IsNotPage: false, AggregateList: [], WhereList: state.value?.whereList || [] };
	const fetchReq = { ...basicReq, CurrentPage: pagination.value.CurrentPage || 1 };
	const fetchReqProxy = { ModuleCode: state.value?.mdCode };
	const fetchRes = await service.request<FetchMdBillListReq, FetchMdBillListRes>(LOWCODERUNTIMEUNIQUEKEY, "EnjoyQueryList", fetchReq, "", "", fetchReqProxy);
	scrollTriggerd.value = false;
	// state.value.searchCardData = { a:"123" };
	if (!fetchRes) {
		uni.hideLoading();
		return;
	}
	const fetchResData = (fetchRes as FetchMdBillListRes);
	const cacheReturnObject = (Array.isArray(fetchResData?.ReturnObject) ? fetchResData?.ReturnObject?.map(r => ({ ...r, ...lowcodeDefStatus(r) })) : []);
	if (!pagination.value.fetchCount) {
		state.value.mdListData = cacheReturnObject;
		pagination.value = { ...pagination.value, RowsCount: fetchResData?.RowsCount, PageCount: fetchResData?.PageCount, fetchCount: 1 };
	} else {
		pagination.value.fetchCount = pagination.value.fetchCount + 1;
		state.value.mdListData = (state.value.mdListData || [])?.concat(cacheReturnObject);
	}

	await getCellProps();
	uni.hideLoading();

	if (fetchProxy?.isOnLoad) {
		const userInfoPage = uni.createSelectorQuery().select(".lowcode-nav-wrap");
		userInfoPage.boundingClientRect(rect => (state.value.navWrapRect = (rect as LowcodeRect))).exec();
	}
};

const handleLowCodePage = async () => {
	const lowcodePage = props?.lowcodePage;
	state.value.detailMdCode = props?.detailMdCode || "";
	state.value.mdCode = lowcodePage?.c_lowcode_guid || "";

	const enableApprove = await getRdsSysConfig("单据是否审批", props.mdInfo?.c_md_cname) === "是";
	state.value.enableApprove = enableApprove;

	const menuCFG = lowcodePage?.c_menuCFG || null;
	if (menuCFG && Array.isArray(menuCFG.menus) && menuCFG.menus.length) {
		state.value.menusCFG = menuCFG.menus.slice(0, 3);
		state.value.menusCFGMore = menuCFG.menus.slice(3)?.map(m => ({ text: m.menuTitle || "" }));
	}
	// 列表页 的 ComponentsHeade 写死，用c_is和c_status &&  列表页不显示上传图片和上传文件
	state.value.listColumns = formGridSort(lowcodePage?.Panels?.[0]?.Components?.filter(c => !["fileupload"].includes(c.c_type || "")), { excludeFields: ["c_id", "c_status"] })?.Components;
};

const handleSystemInfo = () => {
	const systemInfo = getSystemInfo();
	state.value.systemInfo = systemInfo;
};

// watch(() => state.value.searchCardData as { [key: string]: any; }, (newVal, oldVal) => {
// 	console.log("watch searchCardData ", newVal, oldVal);
// }, { flush: "post" });

// const RefreshPage = () => {
// 	console.log("state.value", state.value)
// 	fetchMdListData();
// };

// defineExpose({
//   RefreshPage
// });

onLoad(async (proxy) => {
	// console.log("onLoad proxy ", proxy);
	uni.$on("RefreshPage", fetchMdListData);
	await initRdsDict();
	handleSystemInfo();
	await handleLowCodePage();
	fetchMdListData({ isOnLoad: true });
});

// onShow((proxy) => {
// 	console.log("onShow proxy ", proxy);
// });

// onReady(() => {
// 	console.log("onReady proxy ");
// });
</script>

<style scoped lang="scss">
@import '@/main.scss';
@import "../index.scss";
</style>
